package com.example.mapper;

import com.example.pojo.ClazzQueryParam;
import com.example.pojo.VO.ClazzVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface ClazzMapper {
    /**
     * 分页查询
     */
//    @Select("select count(*)from clazz c left join emp e on c.master_id = e.id")
//    Long count();
//    @Select("select c.*, e.name from clazz c left join emp e on c.master_id = e.id limit #{start},#{pageSize}")
//    List<ClazzVO> list(Integer start, Integer pageSize);

//    @Select("select c.* ,e.name masterName\n" +
//            "    from clazz c\n" +
//            "    left join emp e\n" +
//            "    on c.master_id = e.id\n" +
//            "    where c.name like '%J%' and c.update_time BETWEEN c.create_time and c.update_time\n"+
//            "    order by c.update_time desc")
//    List<ClazzVO> list(String name, LocalDate begin, LocalDate end);

    List<ClazzVO> list(ClazzQueryParam clazzQueryParam);
}
